class ProfileController < ApplicationController
  before_filter :protect, :load_user
  def index
    @title = "#{@user.name}的个人主页"
  end
  
  def more_info
    @title = "#{@user.name}的详细信息"
  end
  
  def more_friends
    @title = "#{@user.name}的好友"
  end
  
  def more_requirements
    @title = "#{@user.name}的需求"
  end
  
  private 
  def load_user
    @user = User.find_by_username(params[:username])
    @user = @login_user if @user.nil?
  end
end
